﻿{% extends "gma/base.html" %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-toolbox my-page-title-icon">  </i>
    </h1>
    <p class="page__desc"> 个性化菜单 </p>
</div>

<div class="page__bd">
    {% for item in menu.button %}
    <div class="weui-cells__title"> {{ item.name }} </div>
    <div class="weui-cells">
        {% if 'sub_button' in item %}
            {% for sub_item in item.sub_button %}
            <a class="weui-cell weui-cell_access" href="{{ sub_item.url }}">
                <div class="weui-cell__bd"> <p> {{ sub_item.name }} </p> </div>
                <div class="weui-cell__ft"> {{ sub_item.type }} </div>
            </a>
            {% endfor %}
        {% else %}
             <a class="weui-cell weui-cell_access" href="{{ item.url }}">
                <div class="weui-cell__bd"> <p> {{ item.name }} </p> </div>
                <div class="weui-cell__ft"> {{ item.type }} </div>
            </a>
        {% endif %}
    </div>
    <br>
    {% endfor %}
</div>

<div class="weui-btn-area">
    <a class="weui-btn weui-btn_block weui-btn_primary" href="javascript:MyGet('{% url 'gma:set_custom_menu' %}', '{% url 'gma:settings' %}')">更新用户菜单</a>
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}

<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
<script>
</script>
{% endblock extra_js %}